﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Uinside.CreditSystem.DomainModels.Models
{
    public class BankAccount : BaseModel
    {
        private Setting _bank;
        [ForeignKey("BankId")]
        public virtual Setting Bank
        {
            get
            {
                return _bank;
            }
            set
            {
                SetField(ref _bank, value, "Bank");
            }
        }

        private int _bankId;
        [Required]
        public int BankId
        {
            get
            {
                return _bankId;
            }
            set
            {
                SetField(ref _bankId, value, "BankId");
            }
        }

        private string _bankName;
        [StringLength(20)]
        public string BankName
        {
            get { return _bankName; }
            set { SetField(ref _bankName, value, "BankName"); }
        }

        private string _bankNumber;
        [StringLength(20)]
        public string BankNumber {
            get { return _bankNumber; }
            set { SetField(ref _bankNumber, value, "BankNumber"); }}

        private string _openingBank;
        [StringLength(20)]
        public string OpeningBank {
            get
            {
                return _openingBank;
            }
            set { SetField(ref _openingBank, value, "OpeningBank"); }
        }


        private int _statusId;
        public int StatusId
        {
            get
            {
                return _statusId;
            }
            set
            {
                SetField(ref _statusId, value, "StatusId");
            }
        }

        private Setting _status;
        [ForeignKey("StatusId")]
        public virtual Setting Status {
            get { return _status; }
            set { SetField(ref _status, value, "Status"); }}
    }
}
